package com.molichuxing.services.infrastructure.dto.response;

import java.math.BigDecimal;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.PaymentDetailTypeEnum;

import lombok.Data;

/**
 * <p>
 * 支付
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-08-22
 */
@Data
public class PaymentDetailDto extends ResponseRootDto {
    private static final long serialVersionUID = 6839753636937305973L;

    /**
     *  id
     */
    private Integer id;

    /**
     * 订单号 order_code
     */
    private Long orderCode;

    /**
     * 支付单id payment_id
     */
    private Integer paymentId;

    /**
     * 金额 amount
     */
    private BigDecimal amount;

    /**
     * 类型(1：租车费，2：保证金，3：加购里程费，4：超里程费，5：超时费，6：质损费) type
     */
	private PaymentDetailTypeEnum type;

	public PaymentDetailDto setType(Integer type) {
		this.type = type == null ? null : PaymentDetailTypeEnum.getEnum(type);
		return this;
	}

}
